package com.mall.malladminbackend.mapper;

import com.mall.malladminbackend.entity.Category;
import com.mall.malladminbackend.entity.GridCategory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 作者：郭立仁
 * 描述：永无BUG
 */
@Mapper
public interface CategoryMapper {
    List<GridCategory> selectAll();
    List<Category> selectCate(Integer cateId);


    List<Category> allCategory();

    //删除grid 及其子分类
    int deleteGrid(Integer id);
    int deleteCate(Integer gridId);

    //修改grid 表
    int updateGrid(GridCategory gridCategory);
    //添加grid 表
    int insert(GridCategory gridCategory);

    //根据id删除Cate表
    int deleteCateById(Integer id);

    //修改Cate表
    int updateCate(Category category);

    //添加Cate表
    int insertCate(Category category);

}
